﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Medical.Business;

public partial class control_MainAd : System.Web.UI.UserControl
{
    protected string strAd = string.Empty;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            //首页广告栏
            DataTable dtHomeAdv =new BisBanner().GetList(AdverTypeEnum.HomeAdv);
            foreach (DataRow drAd in dtHomeAdv.Rows)
            {
                strAd += (strAd == string.Empty ? "" : ",") + "['/" + (WebConfigInfo.FilePlace + "d/" + drAd["ImgPlace"].ToString()) + "', '/" + (WebConfigInfo.FilePlace + "d/" + drAd["ImgPlace"].ToString()) + "', " + (drAd["Url"].ToString() == string.Empty ? "null" : "'" + drAd["Url"].ToString() + "'") + ", \"\", \"\"]";
            }
        }
    }
}